﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Progress.master" AutoEventWireup="true" CodeFile="Cart.aspx.cs" Inherits="Web_cartfirst" MaintainScrollPositionOnPostback="false" %>

<%@ Register assembly="DevExpress.Web.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxDataView" tagprefix="dx" %>

<%@ Register assembly="DevExpress.Web.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxDataView" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxGridView.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridLookup" tagprefix="dx1" %>

<%@ Register assembly="DevExpress.Web.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxMenu" tagprefix="dx" %>

<%@ Register assembly="DevExpress.Web.ASPxEditors.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dx" %>

<%@ Register assembly="DevExpress.Web.ASPxGridView.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView" tagprefix="dx" %>


<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

&nbsp;&nbsp;<script src="Scripts/cart_slider/jquery.blueberry.js" type="text/javascript"></script>

<script type="text/javascript">
    $(window).load(function () {
        $('.blueberry').blueberry();
    });
</script>

<table style="width: 100%">
                
        <tr>
            <td colspan="14">
                    <asp:Panel ID="Panel1" runat="server" Height="340px" Width="1071px">
                    <!-- blueberry -->

    <div class="blueberry">
      <ul class="slides" style="height: 340px">
        <li><img src="img/Cart/slide1.png"/></li>
        <li><img src="img/Cart/slide2.png"/></li>
        <li><img src="img/Cart/slide3.png"/></li>
        <li><img src="img/Cart/slide4.png"/></li>
      </ul>
    </div>

<!-- blueberry -->




                        &nbsp;</asp:Panel>
                </td>
        </tr>
        
        <tr>
            <td style="width: 216px; " rowspan="5">

                    <asp:Panel ID="Panel7" runat="server" Height="546px">
                        <dx:ASPxMenu ID="ASPxMenu1" runat="server" AutoSeparators="RootOnly" 
                            ClientIDMode="AutoID" CssFilePath="~/App_Themes/DevEx/{0}/styles.css" 
                            CssPostfix="DevEx" Orientation="Vertical" ShowPopOutImages="True" 
                            SpriteCssFilePath="~/App_Themes/DevEx/{0}/sprite.css" Width="203px" 
                            onitemclick="ASPxMenu1_ItemClick">
                            <loadingpanelimage url="~/App_Themes/DevEx/Web/Loading.gif">
                            </loadingpanelimage>
                            <itemsubmenuoffset firstitemx="2" lastitemx="2" x="2" />
                            <ItemStyle DropDownButtonSpacing="10px" PopOutImageSpacing="10px" />
                            <loadingpanelstyle imagespacing="5px">
                            </loadingpanelstyle>
                            <submenustyle gutterimagespacing="9px" gutterwidth="3px"></submenustyle>
                        </dx:ASPxMenu>
                    </asp:Panel>



                </td>
                <a id="cartgrid">
            <td style="height: 28px" colspan="12">
                <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                    BackColor="White" BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px" 
                    CellPadding="3" onrowdeleting="GridView1_RowDeleting" 
                    onrowediting="GridView1_RowEditing" onrowupdating="GridView1_RowUpdating" 
                    ForeColor="Black" GridLines="Vertical" Width="755px" 
                    onrowcancelingedit="GridView1_RowCancelingEdit" 
                    onselectedindexchanged="GridView1_SelectedIndexChanged">
                    <AlternatingRowStyle BackColor="#CCCCCC" />
                    <Columns>
                        <asp:BoundField DataField="ID" HeaderText="Product ID" ReadOnly="True" />
                        <asp:BoundField DataField="Code" HeaderText="Product Code" 
                            ReadOnly="True" Visible="False" />
                        <asp:BoundField DataField="Name" HeaderText="Product Name" 
                            ReadOnly="True" />
                        <asp:BoundField DataField="Price" HeaderText="Product Price" 
                            ReadOnly="True" />
                        <asp:BoundField DataField="PV" HeaderText="Product PV" 
                            ReadOnly="True" />
                        <asp:BoundField DataField="BV" HeaderText="Product BV" 
                            ReadOnly="True" Visible="False" />
                        <asp:TemplateField HeaderText="Quantity">
                            <EditItemTemplate>
                                <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("Quantity") %>'></asp:TextBox>
                            </EditItemTemplate>
                            <ItemTemplate>
                                <asp:Label ID="Label3" runat="server" Text='<%# Bind("Quantity") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:CommandField ShowEditButton="True" />
                        <asp:CommandField ShowDeleteButton="True" />
                    </Columns>
                    <FooterStyle BackColor="#CCCCCC" />
                    <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
                    <SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White" />
                    <SortedAscendingCellStyle BackColor="#F1F1F1" />
                    <SortedAscendingHeaderStyle BackColor="#808080" />
                    <SortedDescendingCellStyle BackColor="#CAC9C9" />
                    <SortedDescendingHeaderStyle BackColor="#383838" />
                </asp:GridView>
                </a>
            </td>
            <td rowspan="5" style="width: 341px">
                    &nbsp;</td>
        </tr>
        
        <tr>
            <td style="height: 28px">
                <dx:ASPxButton ID="ASPxButton2" runat="server" ClientIDMode="AutoID" 
                    CssFilePath="~/App_Themes/SoftOrange/{0}/styles.css" CssPostfix="SoftOrange" 
                    onclick="ASPxButton1_Click" 
                    SpriteCssFilePath="~/App_Themes/SoftOrange/{0}/sprite.css" Text="Add Items" 
                    Width="110px">
                </dx:ASPxButton>
                <a id="cartgrid">
                <dx:ASPxButton ID="ASPxButton5" runat="server" 
                    PostBackUrl="~/CartCheck.aspx" Text="View Your Cart" Width="130px" 
                    ClientIDMode="AutoID" CssFilePath="~/App_Themes/Office2003Olive/{0}/styles.css" 
                    CssPostfix="Office2003Olive" 
                    SpriteCssFilePath="~/App_Themes/Office2003Olive/{0}/sprite.css" 
                    onclick="ASPxButton5_Click">
                </dx:ASPxButton>
    </a>
            </td>
            <td style="height: 28px" colspan="11">
                &nbsp;</td>
        </tr>
        
        <tr>
            <td style="height: 28px" colspan="2">
                <asp:Label ID="Label6" runat="server" ForeColor="Black"></asp:Label>
            </td>
            <td style="height: 28px">
                &nbsp;</td>
            <td style="height: 28px">
                &nbsp;</td>
            <td style="height: 28px">
                &nbsp;</td>
            <td style="height: 28px">
                &nbsp;</td>
            <td style="height: 28px">
                &nbsp;</td>
            <td style="height: 28px">
                &nbsp;</td>
            <td style="height: 28px">
                &nbsp;</td>
            <td style="height: 28px">
                &nbsp;</td>
            <td style="height: 28px">
                &nbsp;</td>
            <td style="height: 28px">
                &nbsp;</td>
        </tr>
        
        <tr>
            <td style="height: 28px" colspan="12">
                <asp:Label ID="Label4" runat="server" ForeColor="#CC0000"></asp:Label>
            </td>
        </tr>
        
        <tr>
            <td style="height: 28px" colspan="12">
                <dx:ASPxDataView ID="ASPxDataView3" runat="server" ClientIDMode="AutoID" 
                    DataSourceID="SqlDataSource1" Width="100%" 
                    CssFilePath="~/App_Themes/DevEx/{0}/styles.css" CssPostfix="DevEx" 
                    ItemSpacing="4px" PagerAlign="Justify" PagerPanelSpacing="2px" 
                    SpriteCssFilePath="~/App_Themes/DevEx/{0}/sprite.css" RowPerPage="6" 
                    onpageindexchanged="ASPxDataView3_PageIndexChanged">
                    
<ItemTemplate>
<br />
<table style="width: 67%">
<tr>
<td style="width: 267px">
</td>
<td style="width: 132px">
</td>
<td>
</td>
</tr>
<tr>
<td style="width: 267px">
    <asp:Label ID="Label5" runat="server" Font-Bold="True" Text="Product  ID: " 
        Width="100px"></asp:Label>
 </td>
<td style="width: 132px">
<asp:Label ID="Pro_IDLabel" runat="server" Text='<%# Eval("Pro_ID") %>' />
</td>
<td>
</td>
</tr>
<tr>
<td style="width: 267px; height: 24px;">
<b>Code</b>:</td>
<td style="width: 132px; height: 24px;">
<asp:Label ID="CodeLabel" runat="server" Text='<%# Eval("Code") %>' />
</td>
<td style="height: 24px">
</td>
</tr>
<tr>
<td style="width: 267px">
<b>Name</b>:</td>
<td style="width: 132px">
<asp:Label ID="Pro_NameLabel" runat="server" Text='<%# Eval("Pro_Name") %>' />
</td>
 <td>
     &nbsp;</td>
</tr>
<tr>
<td style="width: 267px">
</td>
<td style="width: 132px">
<asp:ImageButton ID="ImageButton2" runat="server" Height="103px" 
        PostBackUrl='<%# Eval("Pro_ID", "Cart_Details.aspx?PID={0}") %>' Width="122px" 
        ImageUrl='<%# Eval("Pro_Image","~//img/productimage//{0}") %>' />
</td>
<td>
    &nbsp;</td>
</tr>
<tr>
<td style="width: 267px">
</td>
<td style="width: 132px">
    <a ID="cartgrid"><b>Price</b>:</a></td>
<td>
    <a ID="cartgrid">
    <asp:Label ID="Pro_PriceLabel" runat="server" Font-Size="Medium" 
        ForeColor="#F65303" Text='<%# Eval("Pro_Price") %>' />
    </a>
</td>
</tr>                            
<tr>
<td style="width: 267px">                                    
</td>                               
<td style="width: 132px">
    &nbsp;</td>
<td>
</td>
</tr>
</table>
 <br/>
                        
 <br/>
                        
 <br/>
                        

 <asp:Button ID="Button1" runat="server" onclick="Button1_Click" 
                            PostBackUrl='<%# "Cart.aspx?GridPID="+Eval("Pro_ID")+","+ Eval("Code") %>' 
                            Text="Add" />
 <br />
                        
 <br/>
                        
 </ItemTemplate>
                    
 <LoadingPanelImage Url="~/App_Themes/DevEx/Web/Loading.gif">
                    
 </LoadingPanelImage>
                    
 <LoadingPanelStyle ImageSpacing="5px">
                    
 </LoadingPanelStyle>
                    
 <DisabledStyle ForeColor="#B1B1B8">
                    
 </DisabledStyle>
                    
</dx:ASPxDataView>
            </td>
        </tr>
        <tr>
            <td style="width: 216px">
                &nbsp;</td>
            <td>
                <dx:ASPxButton ID="ASPxButton1" runat="server" ClientIDMode="AutoID" 
                    CssFilePath="~/App_Themes/SoftOrange/{0}/styles.css" CssPostfix="SoftOrange" 
                    onclick="ASPxButton1_Click" 
                    SpriteCssFilePath="~/App_Themes/SoftOrange/{0}/sprite.css" Text="Add to Cart" 
                    Width="110px">
                </dx:ASPxButton>
                <a id="cartgrid">
                <dx:ASPxButton ID="ASPxButton6" runat="server" 
                    PostBackUrl="~/CartCheck.aspx" Text="View Your Cart" Width="130px" 
                    ClientIDMode="AutoID" CssFilePath="~/App_Themes/Office2003Olive/{0}/styles.css" 
                    CssPostfix="Office2003Olive" 
                    SpriteCssFilePath="~/App_Themes/Office2003Olive/{0}/sprite.css">
                </dx:ASPxButton>
    </a>
            </td>
            <td colspan="11">
                &nbsp;</td>
            <td class="caption580" style="width: 341px">
                &nbsp;</td>
        </tr>
        <tr>
            <td style="width: 216px">
                <a id="cartgrid">
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:MainConnStr %>" 
            
            
                    SelectCommand="SELECT * FROM [Tbl_Product] WHERE ([Cat_ID] = @Cat_ID2)">
            <SelectParameters>
                <asp:QueryStringParameter DefaultValue="A" Name="Cat_ID2" 
                    QueryStringField="CID" Type="String" />
            </SelectParameters>
        </asp:SqlDataSource>
    </a>
            </td>
            <td colspan="12">
                <a id="cartgrid">
                <asp:Label ID="Label2" runat="server" Text="Label" Visible="False"></asp:Label>
                <asp:Label ID="Label1" runat="server" Text="Label" Visible="False"></asp:Label>
    </a>
            </td>
            <td class="caption580" style="width: 341px">
                &nbsp;</td>
        </tr>
    </table>
    </a>
</asp:Content>

